#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/12/19 14:13
# @Author : linjinting
# @Project : Flask-WebService
# @File : __init__.py.py
# @Software: PyCharm

from .base import Config
from .writeconfig import WriteConfig
from .readconfig import ReadConfig


def get_config(file_path=None):
    config = Config()
    config.form_file(file_path)
    # print(config.m_config)
    return config.get_config_obj()


def write_config(config, file_path=None):
    w_config = WriteConfig(config, file_path)
    w_config.write()


# print(file_path)
all_config = get_config()
recv_config = all_config.get('recv')
send_config = all_config.get('send')
mysql_config = all_config.get('mysql')
